<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/pre/header.jsp" %>
    <script src="${ctx}/statics/js/backend/backend.js"></script>
   
</head>
<body>
	<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>
		
<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
    <div class="m_content">
   
        <div class="m_right" id="content">
            <div class="mem_tit">
            </div>
            <br>
            <form action="/1and5Demo/student/update?classroomId=${stu.classsId}" method="post" id="userAdd" onsubmit="return checkUser();">
                <table border="0" class="add_tab" style="width:930px;" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="135" align="right">学生编号</td>
                        <td colspan="3" style="font-family:'宋体';">
                            <input type="text" value="${stu.stuno}" class="add_ipt" name="stuno"/>
                            <input type="hidden" value="${stu.id}" name="id">
                        </td>
                    </tr>
                   
                        <tr>
                            <td width="135" align="right">学生姓名</td>
                            <td>
                                <input type="text" value="${stu.stuname}" class="add_ipt" name="stuname"/>
                            </td>
                        </tr>
                    
                    
                    <tr>
                        <td width="135" align="right">所属电脑</td>
                        <td>
                            <input type="text" value="${stu.computerId}" class="add_ipt" name="computerId" />
                        </td>
                    </tr>
                     <tr>
                        <td width="135" align="right">所在班级</td>
                        <td>
                           <%--  <input type="text" value="${stu.classsId}" class="add_ipt" name="classsId"/> --%>
                           <select name="classsId" id="classsId">

									<c:forEach items="${classroomInfo}" var="desc">
									<c:if test="${desc.id == stu.classsId }">
										<option value="${desc.id }" selected="selected">${desc.className }</option>
									</c:if>
									<c:if test="${desc.computerroomId != stu.classsId }">
										<option value="${desc.id }">${desc.className }</option>
									</c:if>
									</c:forEach>
							</select>
                        </td>
                    </tr>
         
                    <!-- <tr>
                        <td width="135" align="right">所在机房</td>
                        <td>
                            <input type="text" value="${stu.conputerroomId}" class="add_ipt" name="conputerroomId" />
                        </td>
                    </tr>
                    
                    
                      <tr>
                        <td width="135" align="right">所在班级</td>
                        <td>
                            <input type="text" value="${stu.classsId}" class="add_ipt" name="classs"/>
                        </td>
                        
                        
                              <tr>
							<td width="135" align="right">所属机房</td>
							<td>
								<select name="conputerroomId" id ="computerroomId" >
	                                <option value="1">1机房</option>
	                                <option value="2" >2机房</option>
	                                <option value="3" >3机房</option>
	                               <option value="4" >4机房</option>
	                               <option value="5" >5机房</option>
	                               <option value="6" >6机房</option>
	                               <option value="7" >7机房</option>
	                                          
                           		 </select>
                           		 
                    </tr> -->
                 <tr>
                        <td width="135" align="right">联系方式</td>
                        <td>
                            <input type="text" value="${stu.phone}" class="add_ipt" name="phone" />
                        </td>
                    </tr>
                     <tr>
                        <td width="135" align="right">家庭住址</td>
                        <td>
                            <input type="text" value="${stu.address}" class="add_ipt" name="address" />
                        </td>
                    </tr>
								
                              	<script>
                              		
	                              	$(function(){
	                              		
	                              		$("#computerroomId option[value='"+${stu.conputerroomId }+"']").attr("selected","selected");
	                              		$("#classsId option[value='"+${stu.classsId }+"']").attr("selected","selected");
	                              		
	                              		
	                              	});
                              	</script>
                            
			                    
			                    
			         
								</td>
						</tr>
                    <tr>
                        <td></td>
                        <td>
                                    <input type="submit" value="修改信息" class="s_btn" >
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
 
</div>
</body>
</html>


